<template>
	<web-view :src="url" :update-title="false" @error="handleError" allow="autoplay no-referrer"></web-view>
</template>

<script>
	export default {
		data() {
			return {
				url: ''
			}
		},
		onLoad(options) {
			if (!options.url) {
				this.$u.toast('缺少url参数')
				return
			}
			this.url = options.url
		},
		onNavigationBarButtonTap() {
			uni.switchTab({
				url: '/pages/me/me'
			})
		},
		methods: {
			handleError(e) {
				this.$u.toast('网页加载失败' + e)
			}
		}

	}
</script>

<style>
</style>